home *** CD-ROM | disk | FTP | other *** search
- on SetDcRollOver
- global listRollGen
- if (listRollGen = list()) or voidp(listRollGen) then
- set listRollGen to list()
- exit
- end if
- UnPuppetSprRoll()
- set listRollGen to list()
- end
-
- on UnPuppetSprRoll
- global listRollGen
- set Piste to 2
- repeat with AccuA = 1 to getAt(listRollGen, 1)
- FalsePisteTest(getAt(listRollGen, Piste))
- set Piste to Piste + 4
- end repeat
- end
-
- on InitRollGen Champs, operande
- global listRollGen
- if (paramCount() <> 2) or (listRollGen = list()) then
- set listRollGen to list(0)
- end if
- set Pz to 1
- set AccuLen to the number of words in Champs / 4
- repeat with AccuB = 1 to AccuLen
- add(listRollGen, value(word Pz of Champs))
- add(listRollGen, the number of cast word Pz + 1 of Champs)
- add(listRollGen, the number of cast word Pz + 2 of Champs)
- add(listRollGen, the number of cast word Pz + 3 of Champs)
- set Pz to Pz + 4
- end repeat
- setAt(listRollGen, 1, (count(listRollGen) - 1) / 4)
- PuppetSprRoll(listRollGen)
- BalayRollGen()
- end
-
- on AjouteRollGen Champs, operande
- InitRollGen(Champs, 1)
- end
-
- on PuppetSprRoll
- global listRollGen
- set Piste to 2
- repeat with AccuA = 1 to getAt(listRollGen, 1)
- puppetSprite(getAt(listRollGen, Piste), 1)
- set Piste to Piste + 4
- end repeat
- end
-
- on BalayRollGen
- global listRollGen, DcCursMain
- if listRollGen = [] then
- exit
- end if
- set Pz to 2
- repeat with Compteur = 1 to getAt(listRollGen, 1)
- set NumSpr to getAt(listRollGen, Pz)
- if rollOver(NumSpr) then
- set the castNum of sprite NumSpr to getAt(listRollGen, Pz + 2)
- SetAffTxtRoll(getAt(listRollGen, Pz + 3))
- set DcCursMain to 1
- else
- set the castNum of sprite NumSpr to getAt(listRollGen, Pz + 1)
- end if
- set Pz to Pz + 4
- end repeat
- end
-
- on SetDcRollTexte
- global listRollTexte
- set listRollTexte to list()
- end
-
- on InitRollTexte Champs, operande
- global listRollTexte
- if (paramCount() <> 2) or (listRollTexte = list()) then
- set listRollTexte to list(0)
- end if
- set Pz to 1
- set AccuLen to the number of words in Champs / 2
- repeat with AccuB = 1 to AccuLen
- add(listRollTexte, value(word Pz of Champs))
- add(listRollTexte, the number of cast word Pz + 1 of Champs)
- set Pz to Pz + 2
- end repeat
- setAt(listRollTexte, 1, (count(listRollTexte) - 1) / 2)
- BalayRollTexte()
- end
-
- on AjouteRollTexte Champs, operande
- InitRollTexte(Champs, 1)
- end
-
- on BalayRollTexte
- global listRollTexte, DcCursMain
- if listRollTexte = [] then
- exit
- end if
- set Pz to 2
- repeat with Compteur = 1 to getAt(listRollTexte, 1)
- if rollOver(getAt(listRollTexte, Pz)) then
- SetAffTxtRoll(getAt(listRollTexte, Pz + 1))
- set DcCursMain to 1
- end if
- set Pz to Pz + 2
- end repeat
- end
-
- on SetDcRollCadre
- global listRollCadre
- if (listRollCadre = list()) or voidp(listRollCadre) then
- set listRollCadre to list()
- exit
- end if
- FalsePisteTest(getAt(listRollCadre, 1))
- set listRollCadre to list()
- end
-
- on InitRollCadre SprRoll, NomCadre, NbrCol, NbrLig, Xcoeff, Ycoeff, XcolFixe, YligFixe, Champs
- global listRollCadre
- set listRollCadre to list(SprRoll, 0, 0, 0, 0, 0, NbrCol, NbrLig, Xcoeff, Ycoeff, XcolFixe - 1, YligFixe - 1, 1, 1)
- setAt(listRollCadre, 2, the number of cast NomCadre)
- setAt(listRollCadre, 3, the left of sprite SprRoll)
- setAt(listRollCadre, 4, the top of sprite SprRoll)
- setAt(listRollCadre, 5, getAt(listRollCadre, 3) + (NbrCol * Xcoeff))
- setAt(listRollCadre, 6, getAt(listRollCadre, 4) + (NbrLig * Ycoeff))
- set Pz to 1
- repeat with Compteur = 1 to the number of words in Champs / 2
- add(listRollCadre, word Pz of Champs)
- add(listRollCadre, the number of cast word Pz + 1 of Champs)
- set Pz to Pz + 2
- end repeat
- puppetSprite(SprRoll, 1)
- BalayRollCadre()
- end
-
- on ClicCadreRoll
- global listRollCadre, DcDemoRec
- if listRollCadre = [] then
- exit
- end if
- set NomMacro to getAt(listRollCadre, (((getAt(listRollCadre, 14) * getAt(listRollCadre, 7)) + getAt(listRollCadre, 13)) * 2) + 15)
- if DcDemoRec then
- CorParaDemRec(NomMacro)
- end if
- do(NomMacro)
- end
-
- on BalayRollCadre
- global listRollCadre, DcCursMain, CastEfface
- if listRollCadre = [] then
- exit
- end if
- set SprRoll to getAt(listRollCadre, 1)
- set AccuX to the mouseH
- if AccuX > getAt(listRollCadre, 3) then
- if AccuX < getAt(listRollCadre, 5) then
- set AccuY to the mouseV
- if AccuY > getAt(listRollCadre, 4) then
- if AccuY < getAt(listRollCadre, 6) then
- set AccuX to (AccuX - getAt(listRollCadre, 3)) / getAt(listRollCadre, 9)
- set AccuY to (AccuY - getAt(listRollCadre, 4)) / getAt(listRollCadre, 10)
- set IndexPara to (((AccuY * getAt(listRollCadre, 7)) + AccuX) * 2) + 15
- if getAt(listRollCadre, IndexPara) <> "Nothing" then
- set the castNum of sprite SprRoll to getAt(listRollCadre, 2)
- set the locH of sprite SprRoll to (AccuX * getAt(listRollCadre, 9)) + getAt(listRollCadre, 3)
- set the locV of sprite SprRoll to (AccuY * getAt(listRollCadre, 10)) + getAt(listRollCadre, 4)
- SetAffTxtRoll(getAt(listRollCadre, IndexPara + 1))
- setAt(listRollCadre, 13, AccuX)
- setAt(listRollCadre, 14, AccuY)
- set DcCursMain to 1
- exit
- end if
- end if
- end if
- end if
- end if
- if getAt(listRollCadre, 11) <> -1 then
- set the castNum of sprite SprRoll to getAt(listRollCadre, 2)
- set the locH of sprite SprRoll to (getAt(listRollCadre, 11) * getAt(listRollCadre, 9)) + getAt(listRollCadre, 3)
- set the locV of sprite SprRoll to (getAt(listRollCadre, 12) * getAt(listRollCadre, 10)) + getAt(listRollCadre, 4)
- else
- set the castNum of sprite SprRoll to CastEfface
- end if
- end
-